def extract_menu_info(soup):
    result = ['HOME']
    """提取菜单信息"""
    # 获取一级菜单 - 根据document.querySelector("header .is-current").innerText
    primary_menu = soup.select_one("header .is-current")
    primary_menu_text = ""
    if primary_menu:
        result.append( primary_menu.get_text(strip=True))
    
    # 获取下级菜单 - 根据document.querySelectorAll(".subnav .subnav__bc")
    sub_menus = soup.select(".subnav .subnav__bc")
    sub_menu_texts = []
    for sub_menu in sub_menus:
        text = sub_menu.get_text(strip=True)
        if text:
            result.append(text)
    
    return result

def update_media_urls(item, media_urls):
    """更新媒体URLs"""
    if media_urls.get('images'):
        item['images'].extend(media_urls['images'])
    if media_urls.get('videos'):
        item['videos'].extend(media_urls['videos'])
    if media_urls.get('audios'):
        item['audios'].extend(media_urls['audios'])
    if media_urls.get('main_files'):
        # 提取URL字符串
        item['main_files'].extend(media_urls['main_files'])
    if media_urls.get('attachment_files'):
        # 提取URL字符串
        item['attachment_files'].extend(media_urls['attachment_files'])